.TH FSGRAB 1 "10 September 1998" "Version 1.2" "Local Software"
.\" Process this file with
.\" groff -Tlatin1 -man fsgrab.1
.\"


.SH NAME
fsgrab \- grab blocks from an (unmounted) filesystem


.SH SYNOPSIS
\fBfsgrab\fP
[\fB-b\fP \fIblocksize\fP]
[\fB-c\fP \fIcount\fP]
[\fB-s\fP \fIskip\fP]
[\fB-f\fP]
[\fIdevice\fP]


.SH DESCRIPTION
\fBfsgrab\fP seeks into a file (normally a block device file), and copies
blocks from the appropriate point in that file to standard output.  The
device defaults to \fB/dev/hda1\fP if none is named specifically.


.SH OPTIONS

.TP
\fB-b\fP \fIblocksize\fP
Use a block size of \fIblocksize\fP instead of the default 1024 bytes.

.TP
\fB-c\fP \fIcount\fP
Write out \fIcount\fP blocks instead of the default 1 block.

.TP
\fB-s\fP \fIskip\fP
Ignore the first \fIskip\fP blocks of input instead of the default zero.

.TP
\fB-f\fP
Force writing to standard output even if it is a terminal.


.SH BUGS

\fBfsgrab\fP may break if you try to seek more than 2097151 1k-blocks into a
device; this is caused by the limitations of the \fBlseek\fP(2) system call.
\fBfsgrab\fP makes some attempt to use \fBext2fs_llseek\fP(3) (from the
\fBe2fsprogs\fP library) or \fBllseek\fP(2) where available to seek further
into a device, but the code has not been widely tested.


.SH "SEE ALSO"

.TP
\fBdd\fP(1).
Note that unlike \fBdd\fP, \fBfsgrab\fP actually seeks past any data to be
skipped.

.TP
\fBlseek\fP(2), \fBllseek\fP(2).

.TP
\fBe2fsprogs\fP
\fIhttp://web.mit.edu/tytso/www/linux/e2fsprogs.html\fP.


.SH AUTHOR
Aaron Crane \fI<aaronc@pobox.com>\fP.  Bug-reports, comments and patches are
always welcomed.


.SH COPYRIGHT
Copyright \(co 1997, 1998 Aaron Crane \fI<aaronc@pobox.com>\fP.

.LP
\fBfsgrab\fP is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.

.LP
\fBfsgrab\fP is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.

.LP
You should have received a copy of the GNU General Public License along with
\fBfsgrab\fP; see the file \fBCOPYING\fP. If not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
